<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title><?php echo $title; ?></title>
        <link rel="stylesheet" href="<?php echo BASE_PATH; ?>/css/reset.css" type="text/css" media="screen, projection" />
        <link rel="stylesheet" href="<?php echo BASE_PATH; ?>/css/base.css" type="text/css" media="screen, projection" />
        <script type="text/javascript" src="<?php echo BASE_PATH; ?>/js/biji.js"></script>
        <script type="text/javascript" src="<?php echo BASE_PATH; ?>/js/validator.js"></script>
        <script type="text/javascript" src="<?php echo BASE_PATH; ?>/js/dateinput.js"></script>
        <script type="text/javascript" src="<?php echo BASE_PATH; ?>/js/notification.js"></script>
    </head>
    <body>
        <div id="top-strip"></div>
        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1><a href="<?php echo BASE_PATH; ?>/">Bekti</a></h1>
                    <h2>Photo Sharing</h2>
                </div>
                <div id="nav">
                    <ul>
                        <li><a href="<?php echo BASE_PATH; ?>/" id="homeMenu">Home</a></li>
                        <?php if ($this->session->get("authenticated")): ?>
                            <li><a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $this->session->get("user_id"); ?>">Profile</a></li>
                            <li><a href="<?php echo BASE_PATH; ?>/messages/show/<?php echo $this->session->get("user_id"); ?>">Message</a></li>
                            <li><a href="<?php echo BASE_PATH; ?>/photos/upload">Upload</a></li>
                            <li><a href="<?php echo BASE_PATH; ?>/aggregators/search">Search</a></li>
                            <li><a href="<?php echo BASE_PATH; ?>/users/logout">Logout</a></li>
                        <?php else: ?>
                                <li><a href="<?php echo BASE_PATH; ?>/aggregators/search">Search</a></li>
                                <li><a href="<?php echo BASE_PATH; ?>/users/signup">Sign Up</a></li>
                                <li><a href="<?php echo BASE_PATH; ?>/users/login">Login</a></li>
                        <?php endif ?>
                            </ul>
                        </div>
                    </div>
            <?php $flash_message = $this->session->get_flash(); ?>
            <?php if ($flash_message != NULL): ?>
                                    <div id="flash">
                                        <p><?php echo $flash_message ?></p>
                                    </div>
            <?php endif ?>
            <?php if ($this->session->get("authenticated")): ?>
                <script type="text/javascript">
                    ajax_notif();
                    function ajax_notif() {
                        biji.load("<?php echo BASE_PATH; ?>/users/notification/<?php echo $this->session->get("user_id") ?>", function(data) {
                            if(data != 0) {
                                displayNotif('homeMenu',data);
                            } else {
                                hideNotif();
                            }
                        });
                        window.setTimeout('ajax_notif()', 1000);
                    }
                </script>
            <?php endif ?>
            <div id="content">
